deploy: Also log to journal if we time out global sync()
authorColin Walters <walters@verbum.org>
Thu, 20 Jan 2022 15:50:07 +0000 (10:50 -0500)
committerColin Walters <walters@verbum.org>
Thu, 20 Jan 2022 15:52:04 +0000 (10:52 -0500)
We do implicitly have this data because we log timings via structured
metadata in a later journal entry, but it's quite common to lose
the structured metadata because a lot of tooling just grabs the default
syslog-compatible text from `journalctl`.

Let's be louder when we hit this case as a general rule too; I think
most people shipping ostree systems want to see if it's happening.

src/libostree/ostree-sysroot-deploy.c

index 6ee62410e3df5123f1bacc51cb05a1e8730cfc4f..726379d63bec844bab1a9172f44de071137231ed 100644 (file)
@@ -1647,7 +1647,10 @@ full_system_sync (OstreeSysroot     *self,
       while (!syncdata->success)
         {
           if (!g_cond_wait_until (&syncdata->cond, &syncdata->mutex, end_time))
-            break;
+            {
+              ot_journal_print (LOG_INFO, "Timed out waiting for global sync()");
+              break;
+            }
         }
       g_mutex_unlock (&syncdata->mutex);
       sync_data_unref (syncdata);